<script setup>
const { name, myid } = defineProps({
    name: String,
    myid: Number
})

console.log(name, myid)

</script>

<template>
    <h2>动态路由传参</h2>
    <h3>通配符传参</h3>
    <ul>
        <li>参数一:{{ $route.params.name }}</li>
        <li>参数二:{{ $route.params.myid }}</li>
    </ul>
    <h3>query参数</h3>
    <ul>
        <li>参数一:{{ $route.query.name }}</li>
        <li>参数二:{{ $route.query.age }}</li>
    </ul>
    <h2>子路由展示</h2>
    <router-link to="/about/aboutchildb">AboutChildB</router-link>
    <router-view></router-view>
</template>

